.chat-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
}

// 消息部分
.msg-list {
  flex: 1 1 auto;
  height: 0;
  padding: 20rpx;
  background: #F4F7FC;
  position: relative;
  z-index: 1;

  // 第一个标题图
  .header {
    position: relative;
    color: #FFFFFF;
    width: 100%;

    .bg {
      width: 100%;
      border-radius: 12rpx;
    }

    .text {
      position: absolute;
      top: 0;
      left: 0;
      bottom: 0;
      right: 0;
      padding: 0 32rpx;
      display: flex;
      justify-content: center;
      flex-direction: column;

      .hello {
        font-weight: 800;
        font-size: 40rpx;
        line-height: 44rpx;
        padding-bottom: 20rpx;
      }

      .detail {
        font-weight: 500;
        font-size: 32rpx;
        line-height: 50rpx;
      }
    }
  }

  // 消息列表
  .msg-item {
    padding-top: 40rpx;
    display: flex;
    align-items: flex-start;

    .flex-auto {
      flex: 1;

      .content {
        text-align: left;
        display: inline-block;
        white-space: pre-wrap;
        word-break: break-all;
        font-size: 32rpx;
        line-height: 50rpx;
        padding: 15rpx 20rpx;
        border-radius: 12rpx;
      }
    }

    .avatar {
      width: 80rpx;
      height: 80rpx;
    }
  }

  .msg-item.me {
    .flex-auto {
      text-align: right;
      padding-right: 20rpx;
      padding-left: 100rpx;

      .content {
        background: #00ADAD;
        color: #fff;
      }
      .edit-answer{
        height: 46rpx;
        line-height: 46rpx;
        font-weight: 500;
        font-size: 24rpx;
        color: #00ADAD;
      }
    }
  }

  .msg-item.bot {
    .flex-auto {
      text-align: left;
      padding-left: 20rpx;
      padding-right: 100rpx;

      .content {
        .icon {
          display: inline-block;

          image {
            width: 40rpx;
            height: 40rpx;
            vertical-align: sub;
            padding-right: 5rpx;
          }
        }

        background: #fff;
        color: #292929;
      }
    }
  }
}

// 底部输入框
.is-first-view {
  padding: 30rpx;
  .is-first-btn {
    padding: 20rpx 0;
    text-align: center;
    border: 2rpx solid #E8E8E8;
    border-radius: 12rpx;
    margin-bottom: 30rpx;
    .title {
      font-weight: bold;
      font-size: 36rpx;
      color: #292929;
    }
    .detail {
      font-weight: 500;
      font-size: 28rpx;
      color: #787B80;
    }
  }
  .is-first-btn.active{
    background: #00ADAD;
    border: 2px solid #E8E8E8;
    .title,.detail{
      color: #FFFFFF;
    }
  }
  .is-first-btn.confirm-btn{
    background: #00ADAD;
    .title,.detail{
      color: #FFFFFF;
    }
  }
  .is-first-btn.confirm-btn.disabled{
    background: #E5E5E5;
  }
}

.input-bar {
  display: flex;
  padding: 20rpx 30rpx;
  border-top: 2rpx solid #E4E7ED;
  background: #F5F7FA;
  align-items: center;

  .switch-btn {
    padding: 16rpx;
    font-size: 0;
    background-color: #fff;
    border-radius: 50%;

    .btn-icon {
      width: 48rpx;
      height: 48rpx;
    }
  }

  .text-input {
    flex: 1;
    position: relative;
    padding-left: 30rpx;

    .textarea {
      border-radius: 40rpx;
      background: #FFFFFF;
      width: 100%;
      min-height: 80rpx;
      max-height: 300rpx;
      padding-top: 20rpx;
      padding-bottom: 20rpx;
      padding-left: 50rpx;
      padding-right: 100rpx;
    }

    .send-btn {
      position: absolute;
      right: 10rpx;
      bottom: 10rpx;
      width: 60rpx;
      height: 60rpx;
      font-size: 0;
      background: #00ADAD;
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;

      .btn-icon {
        width: 30rpx;
        height: 26rpx;
      }
    }

    .send-btn.disabled {
      background: #00ADAD;
      opacity: 0.63;
    }
  }

  .voice-input {
    flex: 1;
    padding-left: 30rpx;

    .record-btn {
      border-radius: 40rpx;
      width: 100%;
      background: #FFFFFF;
      height: 80rpx;
      line-height: 80rpx;
      text-align: center;
      font-size: 32rpx;
      color: #292929;
      padding: 0;
    }
  }

  .talk-done {
    border-radius: 12rpx;
    width: 100%;
    background: #00ADAD;
    height: 80rpx;
    line-height: 80rpx;
    text-align: center;
    font-size: 32rpx;
    color: #fff;
    padding: 0;
  }
}

// 录音中的模态框
.record-modal {
  position: fixed;
  top: 40%;
  left: 10%;
  right: 10%;
  height: 160rpx;
  background: #00ADAD;
  border-radius: 100rpx;
  z-index: -1;
  display: flex;
  align-items: center;
  justify-content: center;
}

// 录音完毕后的翻译模态框
.preview-modal {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  z-index: 2;

  .scroll-body {
    flex: 1 1 auto;
    padding: 50rpx 30rpx;

    .inner {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 100%;

      .textarea-view {
        width: 100%;
        background: #F0FFFD;
        position: relative;
        border-radius: 12rpx;
        padding: 26rpx;
        min-height: 50rpx;

        .textarea {
          width: 100%;
          border-radius: 12rpx;
          background: #F0FFFD;
          max-height: 500rpx;
          font-size: 32rpx;
        }

        .edit-tiip-header {
          position: absolute;
          top: -50rpx;
          left: 0;
          right: 0;
          font-weight: 500;
          font-size: 28rpx;
          color: #FFFFFF;
          text-align: center;
        }
      }

      .textarea-view::after {
        content: "";
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: -40rpx;
        /* 把三角放在盒子下面 */
        width: 0;
        height: 0;
        border-left: 40rpx solid transparent;
        border-right: 40rpx solid transparent;
        border-top: 40rpx solid #F0FFFD;
      }
    }
  }

  .btn-group {
    display: flex;
    padding-bottom: 100rpx;

    .btn {
      width: 120rpx;
      height: 120rpx;
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;

      .btn-icon {
        width: 100rpx;
        height: 80rpx;
      }
    }

    .useful {
      background: #00ADAD;
    }

    .disabled {
      background: #C0C4CC;
    }
  }
}

.report-body {
  flex: 1 1 auto;
  height: 0;
  padding: 40rpx 30rpx;
  background: #F4F7FC;
  display: flex;
  flex-direction: column;

  .report-scroll {
    flex: 1 1 auto;
    height: 0;
    border-radius: 20rpx;
    overflow: hidden;

    .report-div {
      border-radius: 20rpx;
      overflow: hidden;
      background-color: #fff;

      .header {
        line-height: 92rpx;
        background: #00ADAD;
        font-weight: bold;
        font-size: 32rpx;
        color: #FFFFFF;
        display: flex;
        justify-content: center;
        align-items: center;

        .header-txt {
          padding: 0 10rpx;
        }

        image {
          width: 34rpx;
          height: 24rpx;
        }
      }

      .patient-msg {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 40rpx 0;
        border-bottom: 1px solid #EEEEEE;

        .avatar {
          width: 100rpx;
          height: 100rpx;
        }

        .msg {
          padding-left: 40rpx;

          .msg-patient {
            display: flex;
            align-items: center;

            view {
              font-weight: bold;
              font-size: 36rpx;
              color: #292929;

              .tag {
                font-weight: bold;
                font-size: 24rpx;
                line-height: 44rpx;
                color: #0C96B2;
                padding: 0 16rpx;
                background: #EBF7FA;
              }
            }

            view+view {
              padding-left: 16rpx;
            }
          }

          .msg-time {
            padding-top: 16rpx;
            font-weight: 500;
            font-size: 28rpx;
            color: #7F7F7F;
          }
        }
      }

      .doc {
        padding: 20rpx 36rpx;

        .doc-item {
          padding: 10rpx 0;
          display: flex;
          font-size: 28rpx;
          color: #292929;
          line-height: 44rpx;

          .title {
            padding-left: 8rpx;
            height: 44rpx;
            width: 160rpx;
            background: linear-gradient(270deg, #FFFFFF 0%, #EBF7FA 100%);
            border-radius: 4rpx 0px 0px 4rpx;
            color: #0C96B2;
          }

          .value {
            flex: 1 1 auto;
            width: 0;
            word-break: break-all;
          }
        }

        .edit-doc-item {
          .title {
            padding-top: 12rpx;
            font-weight: bold;
            font-size: 32rpx;
            color: #0C96B2;
            line-height: 32rpx;
          }

          .value {
            padding-top: 12rpx;

            textarea {
              padding: 20rpx 28rpx;
              font-weight: 500;
              font-size: 28rpx;
              color: #292929;
              background: #F8F8F8;
              border-radius: 12rpx;
              min-height: 70rpx;
            }
          }
        }
      }
    }
  }

  .btn-group {
    text-align: center;
    padding-top: 60rpx;

    .btn {
      margin-top: 20rpx;
      display: inline-block;
      width: 80%;
      height: 92rpx;
      line-height: 92rpx;
      border-radius: 12rpx;
      text-align: center;
      color: #00ADAD;
      font-size: 32rpx;
    }

    .btn-green {
      color: #FFFFFF;
      background: #00ADAD;
    }

    .border {
      border: 2rpx solid #00ADAD;
    }

    .flex {
      justify-content: space-between;

      .btn {
        width: 45%;
      }
    }
  }
}

.flex {
  display: flex;
}